<?php

namespace common\entities\outstock;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_out_stock_step".
 *
 * @property string $id
 * @property string $order_id
 * @property string $operate_people_id
 * @property string $operate_people_department_id
 * @property integer $action
 * @property string $remarks
 * @property string $created_on
 * @property string $created_by
 */
class MyscrmOutStockStepEntity extends ContractEntity
{
    public $result; // 审批结果
    public $suggestion;//审批建议

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_out_stock_step';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'order_id'], 'required'],
            [['action'], 'integer'],
            [['created_on'], 'safe'],
            [['id', 'order_id', 'created_by'], 'string', 'max' => 36],
            [['operate_people_id', 'operate_people_department_id'], 'string', 'max' => 45],
            [['remarks'], 'string', 'max' => 1024]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'order_id' => '单据ID',
            'operate_people_id' => '操作用户ID',
            'operate_people_department_id' => '操作用户所属部门ID',
            'action' => '动作：1发起，10打回，11撤回，20审批，21确认，22开通，23授权',
            'remarks' => '备注',
            'created_on' => '创建时间',
            'created_by' => '创建人',
        ];
    }
}
